<%@taglib prefix="c" uri="http://java.sun.com/jstl/core_rt"%>
<%@taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<div id="rightContent">
	<h3>List Category</h3>
	<table class="data">
		<tr class="data">
			<th class="data" width="30px">No</th>
			<th class="data">Category Name</th>
			<th class="data">Action</th>
		</tr>
		<c:if test="${!empty listCategory }">
			<c:forEach items="${listCategory}" var="category" varStatus="status">
				<tr class="data">
					<td class="data" width="30px"><c:out value="${status.count}." /></td>
					<td class="data">${category.name }</td>
					<td class="data"><a href="updatecategory?id=${category.id}"><img
							src="/shopping-mall/resources/images/shop/admin/edit.png " title="Edit"></a>
					</td>
				</tr>
			</c:forEach>
		</c:if>
	</table>
	<h3>Create New Category</h3>
	<form:form action="manage-shop-cat.html" method="POST"
		commandName="category">
		<table width="95%">
			<tr>
				<td><b><form:label path="name">Category Name</form:label></b></td>
				<td><form:input type="text" path="name" class="sedang" /></td>
			</tr>
			<tr>
				<td><b><form:label path="name">Position</form:label></b></td>
				<td><form:input type="text" path="position" class="sedang" /></td>
			</tr>
			<tr>
				<td></td>
				<td><input type="submit" class="button" value="Add Category">
					<input type="reset" class="button" value="Reset"></td>
			</tr>
		</table>
	</form:form>
</div>